import { createApp } from "vue";
import { XComponentPlugin } from "x.common";
import project from "./project";
import App from "./App.vue";
import { XPluginHost } from "x.host";

export default class XHome extends XComponentPlugin {
    constructor() {
        super("x.web/home", project.version, project.name, App);
    }
    onHostInit(): void {
        let el = document.createElement("div");
        el.className = "x-plugin";
        createApp(App, { plugin: this }).mount(el);
        this.host!.dom!.appendChild(el);

        this.host!.pluginInit(this);
    }
}
new XHome();
